package org.splink.deepsplink.page.request {
	import flash.display.Sprite;

	/**
	 * @author Max Kugland
	 */
	final internal class InitializeShowAndHideFinalize implements IRequestBuilder {
		private var _builder : OperationBuilder;

		public function InitializeShowAndHideFinalize(overlayIds : Array) {
			_builder = new OperationBuilder(overlayIds);		}

		/**
		 * @inheritDoc
		 */
		public function build(display : Sprite, doOpen : Array, all : Array, pageParams : Array) : Array {
			var ar : Array = new Array();

			_builder.addInitializeOperations(display, ar, doOpen, all, pageParams);
			_builder.addShowAndHideOperations(display, ar, doOpen, all);
			_builder.addFinalizeOperations(ar, doOpen, all);
			
			return ar;
		}
		
		/**
		 * @inheritDoc
		 */
		public function get type() : String {
			return "init-showhide-finalize";
		}
	}
}
